<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsBannerTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('banner', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键id');
			$table->string('banner_title', 64)->nullable()->comment('banner标题');
			$table->string('banner_url')->comment('banner路径');
			$table->boolean('position')->nullable()->default(1)->comment('位置信息1为首页2为作者3为坑吧');
			$table->integer('add_time')->nullable()->comment('添加时间');
			$table->boolean('recommend')->nullable()->default(0)->comment('1为推荐展示');
			$table->string('link_url')->nullable()->comment('跳转地址');
			$table->string('relation_type')->nullable()->comment('关联的类型');
			$table->string('relation_num')->nullable()->comment('relation_num');
			$table->bigInteger('index')->unsigned();
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('banner');
	}

}
